home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19990725-20000114 / 000327_news@columbia.edu _Wed Dec 8 03:34:33 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  6KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id DAA17421
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Wed, 8 Dec 1999 03:34:33 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id DAA24792
  7.     for kermit.misc@watsun.cc.columbia.edu; Wed, 8 Dec 1999 03:29:35 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. Date: Wed, 8 Dec 1999 00:30:10 -0700 
  10. From: <Use-Author-Address-Header@[127.1]>
  11. Message-ID: <TCPSMTP.19.12.8.0.30.10.2375661496.5936661@kincyb.com>
  12. Subject: kermit / tinyirc notes
  13. Organization: mail2news@nym.alias.net
  14. To: kermit.misc@columbia.edu
  15.  
  16.  
  17. (sent to comp.protocols.kermit.misc, scoug-irc,
  18. scoug-programming)
  19.  
  20. Below are some macros that are a first stab at writing
  21. a simple IRC client as a Kermit script.
  22. An envisioned use was as way to get fast help
  23. when trying to recover from a system disaster
  24. and running off of removable media or a 
  25. maintenance partition.
  26. I don't have access to my Warp system right now,
  27. so I haven't spent to much more time on this,
  28. because there seems to be a problem with getting
  29. the EOLs properly interpreted by the Debian Linux 2.1
  30. terminal properly, that didn't seem to show up with 
  31. the first few stabs at this with Kermit/2,
  32. where the terminal emulation is supplied by Kermit.
  33. These hint at a possible use for a 
  34. 'set terminal nl-display crlf'
  35. command. (or maybe someone more knowledgable about
  36. UNIX/c-kermit can suggest an stty/setterm option to solve
  37. the problem.)
  38. Also, it should be possible to have automatic
  39. ping/pong and some CTCP responses using
  40. the 'trigger' feature of recent Kermit versions.
  41.  
  42.  
  43. define self dallasK
  44. define server irc.ca.webbnet.org
  45. define iport 6667
  46. define channel {#scoug}
  47.  
  48. define init set duplex half,  -
  49.      set terminal newline-mode on,
  50. ;  run stty onlret
  51.  
  52.  
  53. define link set host \m(server):\m(iport) /no-telnet-init ,  init, 
  54. define nick    output nick \m(self)\13,
  55. define greet output user leganii \v(ipaddress) \m(server) :Dallas (PHX)\13,
  56. define join  output join \m(channel) \m(self)\13,
  57. define pong  output pong \m(nick)\13,
  58. define say   output privmsg \m(channel) : \%*\13,
  59. #  link nick greet join  and you're connected to a chat channel
  60.  
  61.  
  62.  
  63. What I've had some success with using C-kermit is
  64. to use the 'set network command' feature:
  65.  
  66. set network command
  67. set host irc ......
  68.  
  69. and you can connect if the irc client uses termcap
  70. for console i/o.
  71. ircII works for this fine, but a better division of labor
  72. seemed to be combining kermit with tinyirc, which is less
  73. then 1/10th the size of ircii, at 20K.
  74. The most recent versions of tinyirc use curses,
  75. but using the Lycos ftp search engine an earlier
  76. version that could be compiled using termcap was easily
  77. found.
  78. Toward the front of the C listing, add
  79.  
  80. #include <termcap.h>
  81.  
  82. and for Linux, the posix entry in the make file was changed 
  83. from:
  84.  
  85.  
  86.      $(CC) -O -DUSETERMIOS -o tinyirc tinyirc.c -ltermcap
  87.  
  88. to:
  89.  
  90.      $(CC) -O -DUSETERMIOS -DDO_CTCP -o tinyirc tinyirc.c -lcurses
  91.  
  92. Apparently, now the termcap.h include file is basicly a
  93. interface to curses to provide support for the pre-curses
  94. approach, hence the seeming contradiction of using 
  95. TERMIOS   and the curses library simultaneously.
  96. (I haven't tried this yet, but the 'gnu' choice
  97. in the Makefile might work with the OS/2 EMX compiler
  98. (if someone hasn't already done it) and DJGPP in DOS)
  99. While I was at it I grafted the CTCP ping response from
  100. the more recent versions of tinyirc into this version.
  101. Now with 'set host tinyirc dallas irc.webbnet.org #scoug'
  102. and connect, you go to the tinyirc screen,
  103. ^\-c returns to the kermit command line.
  104. 'cls' frees up the screen from the tinyirc settings
  105. when at the Kermit command line, and ^W^W resets
  106. the tinyirc status line when in kermit connect/terminal
  107. session mode.
  108. Kermit can supply logging and scripting capabilities,
  109. while tinyirc essentially acts as a plugin for Kermit,
  110. providing a 'tunnel' to IRC  handling the IRC specific
  111. aspects of the communication connection.
  112. One possible use that came to mind was to deliver a 
  113. prepared 'speech' over IRC by setting the kermit pacing
  114. to a reasonable interval and transmitting a file
  115. to the chat channel (if you're working
  116. in a full screen environment you can't just dump
  117. the clipboard into your irc client input .).
  118. (Just what the world doesn't need - a new media
  119. for politicians to deliver their blather over! :-) )
  120.  
  121.  
  122. I tried putting Lynx under similar control, 
  123. and the video output came through ok, but apparently
  124. the keyboard input is nonstandard and chokes, so it looks 
  125. like the simplest thing to do might be to try using
  126. w3.org's line mode browser, but then you can telnet into
  127. one of those anyway....
  128. (But I still like turning things upside down and having
  129. a web browser plugin for my telnet client!)
  130.  
  131. Thanks to Nathan Laredo for writing tinyirc,
  132. and the Kermit people at Columbia U. for adding the 
  133. intresting new capabilities to Kermit, and 
  134. Sector & crew at irc.webbnet.org for putting up  with 
  135. my ravings.
  136.  
  137.  
  138.  
  139.  
  140. Regards, Dallas E. Legan 
  141.          dallasii
  142.                  @
  143.                   kincyb
  144.                         .
  145.                           com
  146.          leganii
  147.                 @
  148.                  surfree
  149.                         .
  150.                          com
  151.  
  152.